//
//  BKColleageNavViewController.m
//  baokaodaxue
//
//  Created by liuting on 15/6/15.
//  Copyright (c) 2015年 宏图教育. All rights reserved.
//

#import "BKColleageNavViewController.h"
#import "BKResultOfMatchingProvinceViewController.h"
#import "BKMatchingProvViewModel.h"
#import "BKMatchingProvinceViewController.h"
#import <MBProgressHUD.h>

@interface BKColleageNavViewController ()

@end

@implementation BKColleageNavViewController

- (void)viewWillAppear:(BOOL)animated {
    [super viewWillAppear:animated];
    
    BKResultOfMatchingProvinceViewController *result = [[BKResultOfMatchingProvinceViewController alloc] initWithNibName:NSStringFromClass([BKResultOfMatchingProvinceViewController class]) bundle:nil];
    result.dataSource.dataArray = @[];
    
    NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
    [defaults setBool:YES forKey:@"province_change"];
    [defaults setObject:@"北京" forKey:@"province_pro_text"];
    [defaults setObject:@"不限" forKey:@"province_wenli_text"];
    [defaults setObject:@"不限" forKey:@"province_pici_text"];
    [defaults setObject:@"不限" forKey:@"province_leixing_text"];
    [self pushViewController:result animated:NO];
//    BKMatchingProvViewModel *viewModel = [[BKMatchingProvViewModel alloc] init];
//    [viewModel colleageWithProv:@"北京" wenli:@"不限" pici:@"不限" leixing:@"不限" currentPage:@"1" success:^(NSArray *dataArray) {
//        [hud hide:YES];
//        [hud removeFromSuperview];
//        BKResultOfMatchingProvinceViewController *result = [[BKResultOfMatchingProvinceViewController alloc] initWithNibName:NSStringFromClass([BKResultOfMatchingProvinceViewController class]) bundle:nil];
//        result.dataSource.dataArray = dataArray;
//        
//        [self pushViewController:result animated:NO];
//        
//        
//    } failure:^(NSString *message) {
//        [hud hide:YES];
//        [hud removeFromSuperview];
//        UIAlertView *alertView = [[UIAlertView alloc] initWithTitle:@"提示" message:message delegate:nil cancelButtonTitle:@"好的" otherButtonTitles:nil, nil];
//        [alertView show];
//    }];
    
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}


@end
